<?php
/**
 * Created by PhpStorm.
 * User: Dave
 * Date: 2018/7/31
 * Time: 13:14
 */

namespace Biz\model\statistics;

class StatKvstat extends \Doraemon\pockets\datebase\BaseDbModel
{
    const _CONFIG_FILE_ = 'db_stat';

    const _CONFIG_SELECT_ = 'db_stat';

    const _DATABASE_ = 'hhz_stat';

    const _TABLE_NAME = 'hhz_stat_kvstat_data_by_date';

    public static function getPvCount($specialId = 0, $typeId = 51)
    {
        return self::sum('data_value', [
            'AND' => [
                'type_id' => $typeId,
                'data_key' => $specialId
            ]
        ]);
    }
}